package com.lagou.order.fegin;

import com.lagou.common.pojo.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 自定义Fegin接口，调用Product微服务的所有接口都在此进行定义
 */

@FeignClient(name = "lagou-service-goods",fallback = GoodsFeignFallBack.class)
public interface GoodsFeign {

    @RequestMapping("/goods/query/{id}")
    public Goods queryById(@PathVariable Integer id);

    @GetMapping("/service/port")
    public String getPort();
}
